package system1

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type Sys_departmentRouter struct {
}

// InitSys_departmentRouter 初始化 部门 路由信息
func (s *Sys_departmentRouter) InitSys_departmentRouter(Router *gin.RouterGroup) {
	departmentRouter := Router.Group("department").Use(middleware.OperationRecord())
	departmentRouterWithoutRecord := Router.Group("department")
	var departmentApi = v1.ApiGroupApp.System1ApiGroup.Sys_departmentApi
	{
		departmentRouter.POST("createSys_department", departmentApi.CreateSys_department)   // 新建部门
		departmentRouter.DELETE("deleteSys_department", departmentApi.DeleteSys_department) // 删除部门
		departmentRouter.DELETE("deleteSys_departmentByIds", departmentApi.DeleteSys_departmentByIds) // 批量删除部门
		departmentRouter.PUT("updateSys_department", departmentApi.UpdateSys_department)    // 更新部门
	}
	{
		departmentRouterWithoutRecord.GET("findSys_department", departmentApi.FindSys_department)        // 根据ID获取部门
		departmentRouterWithoutRecord.GET("getSys_departmentList", departmentApi.GetSys_departmentList)  // 获取部门列表
	}
}
